package com.example.model;

import java.util.*;
import lombok.Data;

import java.util.List;
import java.util.ArrayList;

/**
 * x2x
 * 自动生成的实体类
 */
@Data
public class x2x {
    /**
     * activityId
     */
    private String activityId;
    /**
     * name
     */
    private String name;
    /**
     * startDate
     */
    private String startDate;
    /**
     * duration
     */
    private String duration;
    /**
     * participants
     */
    private Participants participants;
    /**
     * schedule
     */
    private List<Schedule> schedule;

    public x2x() {
    }

    public x2x(String activityId, String name, String startDate, String duration, Participants participants, List<Schedule> schedule) {
        this.activityId = activityId;
        this.name = name;
        this.startDate = startDate;
        this.duration = duration;
        this.participants = participants;
        this.schedule = schedule;
    }

    public void addSchedule(Schedule item) {
        if (this.schedule == null) {
            this.schedule = new ArrayList<>();
        }
        this.schedule.add(item);
    }

    public void removeSchedule(Schedule item) {
        if (this.schedule != null) {
            this.schedule.remove(item);
        }
    }
}
